package com.stus.service.impl;

import com.stus.dao.UsersDao;
import com.stus.model.Users;
import com.stus.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Alias on 2016/4/7.
 */
@Service
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersDao usersDao;
    @Override
    public List<Users> UserLogin() {
        List<Users> users = usersDao.listUsers();
        return users;
    }

    @Override
    public Users LoginUser(String username) {
        Users user = usersDao.findUserByName(username);
        return user;
    }
}
